<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件参数</title>
</head>
<body>

<div id="app">


</div>


</body>
<script src="../lib/react/react.development.js"></script>
<script src="../lib/react/react-dom.development.j.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
<script type="text/babel">

    class Testor extends  React.Component{

         constructor(props){
             super(props);

             this.state={
                  message:'hello'
             }
         }

         btnClick(obj,e){
             alert(obj)
         }

         render(){

              return (
                  <div>
                      <button onClick={this.btnClick.bind(this,this.state.message)}>按钮1</button>
                  </div>
              )
         }

    }
    ReactDOM.render(<Testor/>,document.getElementById('app'));



</script>


</html>